#include <stdint.h>
#include "loader.h"

namespace krnlib {
    uint64_t binaryloader::load(uint8_t* code) {
        return jmp2addr((uint64_t)code);
    }
    uint64_t jmp2addr(uint64_t addr) {
        asm("call *%0" : "=r"(addr));
        return addr;
    }
}
